<template>
  <div class="login-wrapper">
    <login-header />
    <tdesign-setting />
    <div class="login-container">
      <div class="title-container">
        <h1 class="title margin-no">{{ appTitle }}统一认证中心</h1>
        <!--        <div class="sub-title">
          <p class="tip">{{ type == 'register' ? '已有账号?' : '没有账号吗?' }}</p>
          <p class="tip" @click="switchType(type == 'register' ? 'login' : 'register')">
            {{ type == 'register' ? '登录' : '注册新账号' }}
          </p>
        </div>-->
      </div>

      <login-form @ok="ok" />
    </div>

    <footer class="copyright">
      <beian />
    </footer>
  </div>
</template>
<script setup lang="ts">
import '@/components/Account/index.less';
import { useRoute } from 'vue-router';
import { LoginForm } from '@/components';
import LoginHeader from '../login/components/Header.vue';
import TdesignSetting from '@/components/SettingModal/index.vue';
import Beian from '@/components/Beian/index.vue';
import { appTitle } from '@/config/global';
import { toClient } from './sso';

const route = useRoute();

function ok() {
  toClient(route.query.redirect as string);
}
</script>
